import express from 'express';
import proxy from 'express-http-proxy';
const app = express();
app.use(express.static('dist'));
app.listen(8081);
console.log('Listening on port 8081');
// For all requests under '/api', proxy to the backend
app.use(
    '/api',
    proxy('http://localhost:80', {
        proxyReqPathResolver: function (req) {
            return '/api' + req.url;
        },
    })
);
